<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>git安装使用 | H5学习笔记</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        <meta name="author" content="逍遥派">
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-expandable-chapters-interactive/expandable-chapters.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../../md/node.js/introduce.html" />
    
    
    <link rel="prev" href="../../md/git/git.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="4.1"
        data-chapter-title="git安装使用"
        data-filepath="md/git/use.md"
        data-basepath="../.."
        data-revision="Tue Dec 19 2017 15:06:52 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="md/html/html.html">
            
                
                    <a href="../../md/html/html.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        HTML
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="md/html/know.html">
            
                
                    <a href="../../md/html/know.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        认识页面、以及行内元素和块级元素
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.1" data-path="md/html/a.html">
            
                
                    <a href="../../md/html/a.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.1.</b>
                        
                        a标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.2" data-path="md/html/path.html">
            
                
                    <a href="../../md/html/path.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.2.</b>
                        
                        文件路径
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.3" data-path="md/html/img.html">
            
                
                    <a href="../../md/html/img.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.3.</b>
                        
                        img标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.4" data-path="md/html/area.html">
            
                
                    <a href="../../md/html/area.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.4.</b>
                        
                        锚点和热区
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.5" data-path="md/html/table.html">
            
                
                    <a href="../../md/html/table.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.5.</b>
                        
                        表格
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.6" data-path="md/html/media.html">
            
                
                    <a href="../../md/html/media.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.6.</b>
                        
                        音频与视频
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.7" data-path="md/html/list.html">
            
                
                    <a href="../../md/html/list.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.7.</b>
                        
                        列表
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.8" data-path="md/html/jframe.html">
            
                
                    <a href="../../md/html/jframe.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.8.</b>
                        
                        内嵌页面
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.9" data-path="md/html/icon.html">
            
                
                    <a href="../../md/html/icon.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.9.</b>
                        
                        网页icon
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.10" data-path="md/html/character.html">
            
                
                    <a href="../../md/html/character.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.10.</b>
                        
                        实体字符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.11" data-path="md/html/form.html">
            
                
                    <a href="../../md/html/form.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.11.</b>
                        
                        form表单
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.12" data-path="md/html/input.html">
            
                
                    <a href="../../md/html/input.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.12.</b>
                        
                        input标签
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.12.1" data-path="md/html/input/radio.html">
            
                
                    <a href="../../md/html/input/radio.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.12.1.</b>
                        
                        radio
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.12.2" data-path="md/html/input/checkbox.html">
            
                
                    <a href="../../md/html/input/checkbox.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.12.2.</b>
                        
                        checkbox
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.12.3" data-path="md/html/input/select.html">
            
                
                    <a href="../../md/html/input/select.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.12.3.</b>
                        
                        select
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.12.4" data-path="md/html/input/file.html">
            
                
                    <a href="../../md/html/input/file.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.12.4.</b>
                        
                        file
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.12.5" data-path="md/html/input/textarea.html">
            
                
                    <a href="../../md/html/input/textarea.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.12.5.</b>
                        
                        textarea
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.12.6" data-path="md/html/input/button.html">
            
                
                    <a href="../../md/html/input/button.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.12.6.</b>
                        
                        button
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="md/css/css.html">
            
                
                    <a href="../../md/css/css.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        CSS
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="md/css/selector.html">
            
                
                    <a href="../../md/css/selector.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        CSS选择器
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.1" data-path="md/css/selector/element.html">
            
                
                    <a href="../../md/css/selector/element.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.1.</b>
                        
                        元素选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.2" data-path="md/css/selector/class.html">
            
                
                    <a href="../../md/css/selector/class.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.2.</b>
                        
                        类选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.3" data-path="md/css/selector/id.html">
            
                
                    <a href="../../md/css/selector/id.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.3.</b>
                        
                        ID选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.4" data-path="md/css/selector/descendant.html">
            
                
                    <a href="../../md/css/selector/descendant.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.4.</b>
                        
                        后代选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.5" data-path="md/css/selector/child.html">
            
                
                    <a href="../../md/css/selector/child.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.5.</b>
                        
                        子元素选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.6" data-path="md/css/selector/general.html">
            
                
                    <a href="../../md/css/selector/general.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.6.</b>
                        
                        兄弟选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.7" data-path="md/css/selector/adjacent.html">
            
                
                    <a href="../../md/css/selector/adjacent.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.7.</b>
                        
                        相邻选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.8" data-path="md/css/selector/pseudo.html">
            
                
                    <a href="../../md/css/selector/pseudo.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.8.</b>
                        
                        伪类选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.9" data-path="md/css/selector/att.html">
            
                
                    <a href="../../md/css/selector/att.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.9.</b>
                        
                        属性选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.10" data-path="md/css/selector/object.html">
            
                
                    <a href="../../md/css/selector/object.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.10.</b>
                        
                        伪对象选择符
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="md/css/style.html">
            
                
                    <a href="../../md/css/style.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        CSS样式属性
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.1" data-path="md/css/style/font.html">
            
                
                    <a href="../../md/css/style/font.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.1.</b>
                        
                        font属性
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.2" data-path="md/css/style/color.html">
            
                
                    <a href="../../md/css/style/color.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.2.</b>
                        
                        color属性
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.3" data-path="md/css/style/text-decoration.html">
            
                
                    <a href="../../md/css/style/text-decoration.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.3.</b>
                        
                        text-decoration属性
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.4" data-path="md/css/style/text-shadow.html">
            
                
                    <a href="../../md/css/style/text-shadow.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.4.</b>
                        
                        text-shadow属性
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.5" data-path="md/css/style/box.html">
            
                
                    <a href="../../md/css/style/box.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.5.</b>
                        
                        box盒子模型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.6" data-path="md/css/style/align.html">
            
                
                    <a href="../../md/css/style/align.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.6.</b>
                        
                        对齐属性
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.7" data-path="md/css/style/position.html">
            
                
                    <a href="../../md/css/style/position.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.7.</b>
                        
                        定位属性
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="md/gitbook/introduce.html">
            
                
                    <a href="../../md/gitbook/introduce.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        gitbook
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="md/gitbook/use.html">
            
                
                    <a href="../../md/gitbook/use.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        gitbook安装及使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="md/gitbook/mardown.html">
            
                
                    <a href="../../md/gitbook/mardown.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        Markdown编辑器语法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="md/gitbook/plugins.html">
            
                
                    <a href="../../md/gitbook/plugins.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        Markdown插件安装配置
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="md/git/git.html">
            
                
                    <a href="../../md/git/git.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        git介绍
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="4.1" data-path="md/git/use.html">
            
                
                    <a href="../../md/git/use.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        git安装使用
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="md/node.js/introduce.html">
            
                
                    <a href="../../md/node.js/introduce.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        NodeJs
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1" data-path="md/node.js/nvm.html">
            
                
                    <a href="../../md/node.js/nvm.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        nvm管理nodejs
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="md/node.js/npm.html">
            
                
                    <a href="../../md/node.js/npm.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        npm介绍及使用
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../" >H5学习笔记</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="gif&#x5B89;&#x88C5;&#x4E0E;&#x4F7F;&#x7528;">Gif&#x5B89;&#x88C5;&#x4E0E;&#x4F7F;&#x7528;</h1>
<h2 id="&#x5B89;&#x88C5;">&#x5B89;&#x88C5;</h2>
<p>&#x8BF7;&#x5230;&#x5B98;&#x7F51; <a href="http://git-scm.com" target="_blank"></a>&#x6216;&#x56FD;&#x5185;&#x7684;&#x4E0B;&#x8F7D;&#x7AD9;&#xFF0C;&#x4E0B;&#x8F7D;&#x5B89;&#x88C5;&#x5305;&#x3002;</p>
<h2 id="&#x914D;&#x7F6E;">&#x914D;&#x7F6E;</h2>
<pre><code>&#x5728;&#x4F60;&#x6240;&#x5728;&#x6587;&#x4EF6;&#x5939;&#x76EE;&#x5F55;&#x4E2D;&#x8FDB;&#x5165;cmd,&#x8F93;&#x5165;git config --global user.name &quot;&#x4F60;&#x7684;&#x90AE;&#x7BB1;&quot;&#x548C;git config --global user.email &quot;&#x4F60;&#x7684;&#x90AE;&#x7BB1;&quot;
</code></pre><h2 id="&#x521B;&#x5EFA;&#x9879;&#x76EE;">&#x521B;&#x5EFA;&#x9879;&#x76EE;</h2>
<h3 id="&#x7B2C;&#x4E00;&#x6B65;">&#x7B2C;&#x4E00;&#x6B65;</h3>
<p>&#x672C;&#x5730;&#x65E0;&#x9879;&#x76EE;&#x65F6;,&#x9700;&#x8981;&#x53BB;&#x7801;&#x4E91;&#x521B;&#x5EFA;&#x9879;&#x76EE;&#xFF0C;&#x7136;&#x540E;&#x590D;&#x5236;&#x94FE;&#x63A5; </p>
<h3 id="&#x7B2C;&#x4E8C;&#x6B65;">&#x7B2C;&#x4E8C;&#x6B65;</h3>
<p>&#x5230;&#x4F60;&#x60F3;&#x8981;&#x653E;&#x6587;&#x4EF6;&#x7684;&#x6587;&#x4EF6;&#x5939;&#x91CC;cmd&#x8FDB;&#x5165;&#x547D;&#x4EE4;&#x884C;&#x8F93;&#x5165;,&#x590D;&#x5236;/&#x514B;&#x9686;&#x4E0B;&#x6765;</p>
<pre><code>git clone  https://github.com/angular/quickstart  /*my-projName*/
</code></pre><h3 id="&#x7B2C;&#x4E09;&#x6B65;">&#x7B2C;&#x4E09;&#x6B65;</h3>
<p>&#x8FDB;&#x884C;&#x6587;&#x4EF6;&#x4E0A;&#x4F20;&#x56DB;&#x6B65;&#x8D70;</p>
<pre><code>git add ./ (&#x6DFB;&#x52A0;&#x672C;&#x5730;&#x961F;&#x5217;)
git commit -m &quot;&#x7B2C;&#x4E00;&#x6B21;&#x63D0;&#x4EA4;&quot; (&#x628A;&#x961F;&#x5217;&#x4E2D;&#x7684;&#x6587;&#x4EF6;&#x63D0;&#x4EA4;&#x5230;&#x672C;&#x5730;&#x5E93;)
git pull (&#x5982;&#x679C;&#x8BE5;&#x9879;&#x76EE;&#x5B58;&#x5728;&#x591A;&#x4EBA;&#x534F;&#x4F5C;&#xFF0C;&#x8FD9;&#x4E00;&#x6B65;&#x5FC5;&#x4E0D;&#x53EF;&#x5C11;&#xFF0C;&#x6709;&#x6548;&#x9632;&#x6B62;&#x6587;&#x4EF6;&#x51B2;&#x7A81;)
git push (&#x628A;&#x672C;&#x5730;&#x5E93;&#x6587;&#x4EF6;&#x63A8;&#x9001;&#x5230;&#x8FDC;&#x7AEF;&#x5E93;)
</code></pre><p>&#x672C;&#x5730;&#x6709;&#x9879;&#x76EE;&#xFF0C;&#x5408;&#x5E76;&#x8FDC;&#x7A0B;&#x5E93;&#x7684;&#x6587;&#x4EF6;&#x5230;&#x672C;&#x5730;</p>
<h3 id="&#x51CC;&#x6CE2;&#x5FAE;&#x6B65;">&#x51CC;&#x6CE2;&#x5FAE;&#x6B65;</h3>
<p>&#x5230;&#x672C;&#x5730;&#x9879;&#x76EE;&#x91CC;&#x7684;&#x6587;&#x4EF6;&#x5939;cmd&#x8FDB;&#x5165;&#x547D;&#x4EE4;&#x7A97;&#x53E3;&#xFF0C;&#x7136;&#x540E;gif&#x56DB;&#x6B65;&#x8D70;&#x3002;</p>
<h2 id="&#x63D0;&#x4EA4;&#x65F6;&#x4EA7;&#x751F;&#x7684;&#x51B2;&#x7A81;">&#x63D0;&#x4EA4;&#x65F6;&#x4EA7;&#x751F;&#x7684;&#x51B2;&#x7A81;</h2>
<p>&#x5728;&#x63D0;&#x4EA4;&#x65F6;&#x53EF;&#x80FD;&#x4F1A;&#x5B58;&#x5728;&#x51B2;&#x7A81;&#xFF0C;&#x6240;&#x8C13;&#x7684;&#x51B2;&#x7A81;&#xFF0C;&#x5C31;&#x662F;&#x4F60;&#x8DDF;&#x4F60;&#x7684;&#x57FA;&#x53CB;&#x5728;&#x4FEE;&#x6539;&#x540C;&#x4E00;&#x4E2A;&#x6587;&#x4EF6;&#x7684;&#x540C;&#x4E00;&#x884C;&#x7684;&#x5185;&#x5BB9;&#x65F6;&#xFF0C;&#x7CFB;&#x7EDF;&#x65E0;&#x6CD5;&#x5224;&#x65AD;&#x7528;&#x8C01;&#x7684;&#x4EE3;&#x7801;   </p>
<p>&#x5F53;&#x4F60;&#x4F7F;&#x7528;git pull&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x4F1A;&#x6709;&#x51B2;&#x7A81;&#x63D0;&#x793A;<br><img src="../media/git_1.png" alt=""></p>
<p>&#x8FD9;&#x4E2A;&#x65F6;&#x5019;&#xFF0C;&#x6211;&#x4EEC;&#x7684;git&#x4F1A;&#x81EA;&#x52A8;&#x628A;&#x51B2;&#x7A81;&#x4F4D;&#x7F6E;&#x663E;&#x793A;&#x5728;&#x76F8;&#x5173;&#x6587;&#x4EF6;&#x91CC;
<img src="../media/git_2.png" alt=""></p>
<p>&#x4E8C;&#x9009;&#x4E00;&#xFF0C;&#x8981;&#x4E48;&#x7559;&#x81EA;&#x5DF1;&#x7684;&#x4EE3;&#x7801;&#xFF0C;&#x8981;&#x4E48;&#x7559;&#x522B;&#x4EBA;&#x7684;&#x4EE3;&#x7801;&#xFF0C;&#x7F16;&#x8F91;&#x5B8C;&#x6210;&#x540E;&#xFF0C;&#x518D;&#x91CD;&#x65B0;&#x56DB;&#x6B65;&#x8D70;<br>&#x5F53;&#x7136;&#xFF0C;&#x67D0;&#x4E9B;&#x7279;&#x6B8A;&#x60C5;&#x51B5;&#xFF0C;&#x9700;&#x8981;&#x5F3A;&#x5236;&#x63A8;&#x9001;&#x7684;&#x8BDD;&#xFF0C;&#x6267;&#x884C;&#x4E0B;&#x9762;&#x7684;&#x547D;&#x4EE4;</p>
<pre><code>git push origin master -f
</code></pre><p>&#x5982;&#x679C;&#x60A8;&#x9009;&#x62E9;&#x4FDD;&#x7559;&#x7EBF;&#x4E0A;&#x7684;readme&#x6587;&#x4EF6;,&#x5219;&#x9700;&#x8981;&#x5728;&#x63D0;&#x4EA4;&#x524D;&#x5148;&#x6267;&#x884C;</p>
<pre><code>git pull origin master
</code></pre><p>&#x62C9;&#x53D6;&#x7684;&#x65F6;&#x5019;&#xFF0C;Git&#x81EA;&#x52A8;&#x5408;&#x5E76;&#xFF0C;&#x5E76;&#x4EA7;&#x751F;&#x4E86;&#x4E00;&#x6B21;&#x63D0;&#x4EA4;<br>&#x5982;&#x679C;&#x4E0D;&#x80FD;&#x591F;&#x81EA;&#x52A8;&#x5408;&#x5E76;&#xFF0C;&#x90A3;&#x4E48;&#x4F1A;&#x63D0;&#x793A;</p>
<h2 id="&#x63D0;&#x4EA4;&#x65F6;&#x8001;&#x662F;&#x63D0;&#x793A;&#x8F93;&#x5165;&#x7528;&#x6237;&#x540D;&#x5BC6;&#x7801;">&#x63D0;&#x4EA4;&#x65F6;&#x8001;&#x662F;&#x63D0;&#x793A;&#x8F93;&#x5165;&#x7528;&#x6237;&#x540D;&#x5BC6;&#x7801;</h2>
<pre><code>git config --global credential.helper store
</code></pre><p>&#x6267;&#x884C;&#x5B8C;&#x540E;&#xFF0C;&#x4E0B;&#x6B21;&#x63D0;&#x4EA4;&#x518D;&#x6B21;&#x8F93;&#x5165;&#x8D26;&#x53F7;&#x5BC6;&#x7801;&#xFF0C;&#x5373;&#x53EF;&#x4EE5;&#x81EA;&#x52A8;&#x5B58;&#x50A8;&#x4E86;</p>
<h2 id="&#x67E5;&#x770B;git&#x5E93;&#x7684;&#x5F53;&#x524D;&#x72B6;&#x6001;">&#x67E5;&#x770B;git&#x5E93;&#x7684;&#x5F53;&#x524D;&#x72B6;&#x6001;</h2>
<pre><code>git status
</code></pre><h2 id="&#x8FD8;&#x539F;&#x4FEE;&#x6539;git-checkout">&#x8FD8;&#x539F;&#x4FEE;&#x6539;git checkout</h2>
<pre><code>&#x8FD8;&#x539F;&#x4FEE;&#x6539;git checkout
</code></pre><h2 id="&#x5982;&#x679C;&#x9047;&#x5230;&#x4EE5;&#x4E0B;&#x60C5;&#x51B5;&#xFF0C;&#x65E0;&#x6CD5;add&#x548C;commit">&#x5982;&#x679C;&#x9047;&#x5230;&#x4EE5;&#x4E0B;&#x60C5;&#x51B5;&#xFF0C;&#x65E0;&#x6CD5;add&#x548C;commit</h2>
<pre><code>On branch master
Your branch is up-to-date with &apos;origin/master&apos;.
Changes not staged for commit:
modified:   ../index.html
no changes added to commit
</code></pre><p>&#x4E0A;&#x9762;&#x8FD9;&#x79CD;&#x60C5;&#x51B5;&#xFF0C;&#x5176;&#x5B9E;&#x662F;&#x56E0;&#x4E3A;&#x4F60;&#x6539;&#x53D8;&#x4E86;index&#x6587;&#x4EF6;&#xFF0C;&#x4F46;&#x5E76;&#x6CA1;&#x6709;&#x6709;&#x6548;&#x7684;add&#x5230;&#x6682;&#x5B58;&#x533A;&#x4E2D;&#xFF0C;&#x9700;&#x8981;&#x68C0;&#x67E5;&#x81EA;&#x5DF1;&#x662F;&#x5426;&#x6709;&#x628A;&#x8BE5;&#x6587;&#x4EF6;&#x6709;&#x6548;&#x7684;git add</p>
<pre><code>&#x53EF;&#x80FD;&#x662F;&#x56E0;&#x4E3A;&#x6211;&#x4EEC;cd&#x5230;&#x4E86;&#x5B50;&#x76EE;&#x5F55;&#xFF0C;&#x7136;&#x540E;&#x518D;&#x6267;&#x884C;git add ./&#xFF0C;&#x4ECE;&#x800C;&#x5BFC;&#x81F4;&#x4FEE;&#x6539;&#x7684;&#x6587;&#x4EF6;&#xFF0C;&#x5E76;&#x6CA1;&#x6709;&#x771F;&#x6B63;&#x7684;&#x6DFB;&#x52A0;&#x8FDB;&#x53BB;)
</code></pre><h2 id="&#x51FA;&#x73B0;fatalmultiple-stage-entries-for-merged-file">&#x51FA;&#x73B0;fatal:multiple stage entries for merged file</h2>
<pre><code>&#x89E3;&#x51B3;&#x529E;&#x6CD5;&#x5982;&#x4E0B;&#xFF1A;
1.&#x6267;&#x884C;rm .git/index&#xFF0C;&#x56DE;&#x8F66;
2.&#x6267;&#x884C;git add -A&#xFF0C;&#x56DE;&#x8F66;
3.git commit -m &quot;&#x60A8;&#x7684;&#x4FEE;&#x6539;&#x8BF4;&#x660E;&quot;
</code></pre><h2 id="&#x65F6;&#x5149;&#x7A7F;&#x68AD;">&#x65F6;&#x5149;&#x7A7F;&#x68AD;</h2>
<h3 id="&#x7B2C;&#x4E00;&#x6B65;">&#x7B2C;&#x4E00;&#x6B65;</h3>
<p>&#x5148;&#x67E5;&#x770B;&#x8981;&#x56DE;&#x9000;&#x7684;&#x65F6;&#x95F4;&#x70B9;
<img src="../media/git_3.png" alt=""></p>
<h3 id="&#x7B2C;&#x4E8C;&#x6B65;">&#x7B2C;&#x4E8C;&#x6B65;</h3>
<p>&#x6839;&#x636E;ID&#x56DE;&#x9000;&#x5230;&#x5386;&#x53F2;&#x7684;&#x67D0;&#x4E00;&#x4E2A;&#x65F6;&#x95F4;</p>
<pre><code>git reset --hard d48bf2fcd99
</code></pre><pre><code>hard&#x7684;&#x53C2;&#x6570;&#x503C;&#x5C31;&#x662F;&#x7B2C;&#x4E00;&#x6B65;&#x6240;&#x83B7;&#x53D6;&#x5230;&#x7684;id(&#x4E0D;&#x9700;&#x8981;&#x5168;&#x90E8;&#xFF0C;&#x53EF;&#x4EE5;&#x622A;&#x53D6;&#x5176;&#x4E2D;&#x4E00;&#x622A;&#x5C31;&#x53EF;&#x4EE5;&#x4E86;
</code></pre>
                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../../md/git/git.html" class="navigation navigation-prev " aria-label="Previous page: git介绍"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../../md/node.js/introduce.html" class="navigation navigation-next " aria-label="Next page: NodeJs"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../../gitbook/app.js"></script>

    
    <script src="../../gitbook/plugins/gitbook-plugin-expandable-chapters-interactive/expandable-chapters.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"expandable-chapters-interactive":{},"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
